﻿@model TumbaloSoft.Models.AdministradorEdificios
@{
    Layout = "~/Views/Shared/_AdministradorGeneralLayout.cshtml";
    ViewBag.Title = "Nuevo Administrador";
}

<script>
    $(function () {
        $("#datepicker").datepicker({
            changeMonth: true,
            changeYear: true, dateFormat: 'dd/mm/yy'
        });
    });
</script>

<script>
    // increase the default animation speed to exaggerate the effect
    //$.fx.speeds._default = 4000;
    $(function () {
        $("#dialog").dialog({
            autoOpen: false,
            resizable: false,
            height: 240,
            modal: true,
            buttons: {
                "Si": function () {
                    $("#form_1").submit();
                    $(this).dialog('close');
                },

                "No": function () {
                    $(this).dialog("close");
                }
            }
        });

        $("#open").click(function () {
            $("#dialog").dialog("open");
            return false;
        });


    });
</script>

<!-- content -->
		<div class="body2">
			<div class="main">
				<section id="content">
					<div class="wrapper">

                        <article class="col0">
                            <nav class="urbangreymenu">
                                <h3 class="headerbar">Mantenimiento Administrador</h3>
                                    <ul id="subMenu">
                                     <li>
									    <h5>@Html.ActionLink("Lista Administradrores", "Index")</h5>
								    </li>
                                    <li>
									    <h5>@Html.ActionLink("Nuevo Administrador", "Registrar")</h5>
								    </li>
                                    </ul>
                            </nav>
                        </article>

                        <article class="col5">
                        <div>&nbsp</div>
                        </article>

                        <!--TODO-->

						<article class="col1" style="width: 500px">
                            <form id="form_1" method="post" style="height:100%">
                                <!--FORMULARIO-->

							    <div class="pad1">
								    <h2 class="pad_bot1 pad_top1">Registrar Nuevo Administrador</h2>
                                        <!--DATOS PERSONALES-->
                                        <h3 class="pad_bot1 pad_top1">Datos Personales: </h3>
                                                                                                                                                              
                                            <!--NOMBRE-->
                                            <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Nombre*:</span></td>
                                                        <td style="width: 210px">
                                                            @Html.TextBoxFor(model => model.prNombre, new { @class = "input", maxlength = "30", placeholder = "Maximo 30 caracteres aqui"})
                                                            @Html.ValidationMessageFor(model => model.prNombre,null)
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>

                                            <!--APELLIDOPATERNO-->
                                            <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Apellido Paterno*:</span></td>
                                                        <td style="width: 210px">    
                                                            @Html.TextBoxFor(model => model.prApellidoPaterno, new { @class="input",maxlength = "30", placeholder = "Maximo 30 caracteres aqui"})
                                                            @Html.ValidationMessageFor(model=> model.prApellidoPaterno,null)
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>

                                            <!--APELLIDOMATERNO-->
                                            <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Apellido Materno:</span></td>
                                                        <td style="width: 210px">                                                                                                          
                                                                @Html.TextBoxFor(model => model.prApellidoMaterno, new { @class="input",maxlength = "30", placeholder = "Maximo 30 caracteres aqui"})
                                                                @Html.ValidationMessageFor(model=> model.prApellidoMaterno)                                                            
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>

                                            <!--LISTA DEL DOCUMENTO-->
                                            <div class="row_select"">
                                                <table style="width:420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Tipo Documento:</span></td>
                                                        <td style="width: 210px">   
                                                            <select name="prTipoDocumento.prIdTipoDocumento">                                                         
                                                                @foreach (var objTipo in ViewBag.listaTipo)
                                                                {
                                                                                                        
                                                                    <option value="@objTipo.prIdTipoDocumento">@objTipo.prDescripcion</option>
                                                                }
                                                            </select>
                                                        </td>                                              
                                                    </tr>
                                                </table>
                                            </div>  

                                     
                                    
                                            <!--DNI-->
                                            <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Numero de Documento*:</span></td>
                                                        <td style="width: 210px">                                                                                                          
                                                                @Html.TextBoxFor(model => model.prCodigoDocumento, new {@Class="input", maxlength="8"})
                                                                @Html.ValidationMessageFor(model=> model.prCodigoDocumento,null)                                                           
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>

                                            <!--RUC-->
                                            <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>RUC:</span></td>
                                                        <td style="width: 210px">                                                                                                          
                                                                @Html.TextBoxFor(model => model.prRuc, new { @Class="input", maxlength="11"})
                                                                @Html.ValidationMessageFor(model=> model.prRuc)                                                          
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>

                                    
                                            <!--SEXO-->
                                    <!--
                                            <div class="wrapper" style="margin: 12px 0px 13px;">
                                                <span>Sexo*</span>
                                                <input type="radio" name="prSexo" id="hombre" value="M" checked="checked" style=" margin-left: 101px;"/>Masculino
                                                <input type="radio" name="prSexo" id="juridica" value="F" style="margin-left: 64px;"/>Femenino
                                            </div>
                                    -->
                                            <!--SEXOOOOOOOOOO-->
                                            <div class="row_select">
                                                <table style="width:420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Sexo:</span></td>
                                                        <td style="width: 210px">   
                                                            <select name="prSexo">                                 
                                                                    <option value="M">Masculino</option>
                                                                    <option value="F">Femenino</option>
                                                            </select>
                                                        </td>                                              
                                                    </tr>
                                                </table>                                                    
                                            </div>
                                    

                                            <!--FECHADENACIMIENTO-->
                                            <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Fecha de Nacimiento*:</span></td>
                                                        <td style="width: 210px"> 
                                                            <input class="input" id="datepicker"  name="prFechaNacimiento"/> 
                                                            @Html.ValidationMessageFor(model=>model.prFechaNacimiento,null)                                                           
                                                        </td>
                                                    </tr>
                                                </table>                                                
                                            </div>

                                            <!--E-MAIL-->
                                            <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Email:</span></td>
                                                        <td style="width: 210px"> 
                                                            @Html.TextBoxFor(model => model.prEmail, new { @Class="input", placeholder="ejemplo@dominio.com"})
                                                            @Html.ValidationMessageFor(model=> model.prEmail,null)
                                                        </td>
                                                    </tr>
                                                </table>            
                                            </div> 
                                                                                    
                                            <!--DIRECCION-->
                                            <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Direccion*:</span></td>
                                                        <td style="width: 210px"> 
                                                            @Html.TextBoxFor(model => model.prDireccion, new { @Class="input",maxlength = "50", placeholder = "Maximo 50 caracteres aqui"})
                                                            @Html.ValidationMessageFor(model=> model.prDireccion,null)
                                                        </td>
                                                    </tr>
                                                </table>  
                                            </div>
                                                                              
                                            <!--TELEFONO-->
                                            <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Telefono:</span></td>
                                                        <td style="width: 210px"> 
                                                            @Html.TextBoxFor(model => model.prTelefono, new { @Class="input", maxlength="9"})
                                                            @Html.ValidationMessageFor(model=> model.prTelefono)
                                                        </td>
                                                    </tr>
                                                </table> 
                                            </div>
                                         

                                            <h3 class="pad_bot1 pad_top1">Datos de la Empresa:</h3>
                                                                            
                                            <!--SUELDOBASE-->
                                            <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Sueldo Base*:</span></td>
                                                        <td style="width: 210px">
                                                            @Html.TextBoxFor(model => model.prSueldo, new { @Class="input"})
                                                            @Html.ValidationMessageFor(model=> model.prSueldo,null)
                                                        </td>
                                                    </tr>
                                                </table> 
                                            </div>

								   <!--Botones everywhere-->
								  <table style="width: 500px">
									 <tr>
										<td style="width: 167px">
											<div id="dialog" title="Nuevo Administrador"	>
												   <p>Esta seguro que desea guardar los datos del administrador?</p>                                                    
												  <!--<a href="#" id="opener"  class="button" onClick="document.getElementById('form_1').submit()">Guardar</a>-->
											 </div>

											   <button id="open"  class="button">Registrar</button>

										</td>
										<td style="width: 166px"><a href="#" class="button" onclick="document.getElementById('form_1').reset()">Limpiar</a></td>
										<td style="width: 167px"><a href="..\Administrador\Index" class="button" onclick="document.getElementById('form_1').cancel()">Cancelar</a></td>
									 </tr>
								  </table>
                                          
							    </div>
                            </form>
						</article>	
					</div>
				</section>
			</div>
		</div>
<!-- / content -->
		
		<script type="text/javascript"> Cufon.now(); </script>

